package com.chaopei.customer_server.controller;

import com.chaopei.customer_server.serrvice.MyService;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;

/**
 * @Author Corday 天涯
 * @Date 2022/4/26 15:28
 */
@RestController
public class MyController {
    @Resource
    private MyService myService;
    //rest+ribbon模式
    //http://localhost:8082/go?inf=我是tom
    @RequestMapping("/go")//准备消费了
    public  String go(@RequestParam("inf") String inf){
       String str= myService.getJson(inf);
      return "Rest拿到:"+str;
    }
}
